Skip to content

docs(skills): the object enable table names aiReadable - #33458

Merged
os-zhuang merged 2 commits into
mainfrom
claude/project-thread-7ha66d
Nov 15, 2026
Merged

os-zhuang merged 2 commits into
mainfrom
claude/project-thread-7ha66d

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Leehom · project thread

Fixes #32974

domain:skills#1 · os-project-manager · session_01FEkQ5nzn5SncinMdswdSzM

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:objectstack-data 技能的对象能力表(enable)加一行 aiReadable:只用于平台系统对象(sys_*,不含 sys_metadata、sys_metadata_history),开放只读 AI 访问(查询、取单条、聚合、describe、列表,永不写);应用对象从不声明它,连 false 也会在解析时被拒。
  • 为什么改:feat(spec): enable.aiReadable — a system object's author can open its records to the AI read tools, read-only #32971 新增了 enable.aiReadable,技能文字没教,AI 照着能力表写应用对象时既不知道它存在,也不知道写在业务对象上会被拒。
  • 风险与回滚:纯技能文字,一个文件加 1 行,外加一个 @objectstack/skills patch changeset;不动 schema、不动运行时;回滚即还原本 PR。
  • 先看:skills/objectstack-data/SKILL.md 第 121 行(能力表最后一行)。
  • 两分钟验证:git diff origin/main -- skills/,预期只见能力表末尾新增 aiReadable 一行,默认列为 —。
  • 需要你做的:受管面 Tier H(skills/**):请批准或合并。

What changes

  • skills/objectstack-data/SKILL.md, Object Capabilities (enable) table, one row after clone:

    | aiReadable | — | Platform sys_* objects only (not sys_metadata, sys_metadata_history): read-only AI access (query, get, aggregate, describe, list; no write). App objects never declare it, false included: refused at parse |

    (backticks around the identifiers in the file). The Default column reads —, not false: an absent key is closed, and writing false on an app object is itself refused, so a false default would invite the one value that fails.

  • .changeset/32974-skills-enable-ai-readable-row.md: '@objectstack/skills': patch, carrying both declaration lines.

Why

Read on origin/main ba35dfd, packages/spec/src/data/ai-read-exposure.ts:

  • aiReadExposureRefusal(objectName, enable) judges any declared value (false included; only an absent or undefined key passes) in this order: first the stored-metadata family (isStoredMetadataBodyObject, STORED_METADATA_BODY_OBJECTS = sys_metadata, sys_metadata_history, in packages/spec/src/kernel/stored-metadata-body-objects.ts) is refused whatever the key says; then a sys_ name (/^sys_/i) is accepted; every other name is refused ("is not a system object ... Remove it").
  • ObjectSchema's refinement calls it through refuseMisplacedAiReadExposure (object.zod.ts), so every door that parses an object refuses it: ObjectSchema.create, defineStack, os validate and the object save door.
  • isAiReadExposed(schema) answers true only for the boolean true on a sys_* object outside that family.
  • The key is live after [Decision] Should an approver be able to see and decide their pending approvals over MCP? #32442: isAiReadExposed is read by packages/runtime/src/domains/mcp.ts, packages/mcp/src/mcp-http-tools.ts and packages/mcp/src/stdio-data-bridge.ts, and two platform objects declare it (sys_user in platform-objects, sys_approval_request in plugin-approvals). The .describe text in ObjectCapabilities says the same as the new row.

Acceptance notes

Verification

Head fa4ef05c, base origin/main ba35dfd.

Line and token budget (skills/**)
  • skills/objectstack-data/SKILL.md: 477 to 478 lines, 26441 to 26678 bytes; token ratchet 6606 to 6665 (ceiling 6665, headroom 0). No ceiling raised.
  • Whole package, all skills/*/SKILL.md: 4602 to 4603 lines, 235787 to 236024 bytes. Bundle total (whole shipped tree): 244310 to 244369 tokens.
  • node scripts/pm/check-skill-line-ratchet.mjs: exit 0. node scripts/check-skills-token-ratchet.mjs: exit 0.
Derived gates: 46 derived, 44 run green, 2 NOT MEASURED

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 46 families for the two paths; each was run with its exit code captured before any pipe.

  • 41 exit 0 on the first run, among them check-adr-0087-registration, check-empty-changeset, check-skills-token-ratchet (scan and --self-test each), @objectstack/spec check:skill-docs, check:doc-authoring, check:nul-bytes, check:pm-governed-merges, check:published-files, check:skill-compatibility, check:skill-frame-sync, check:skill-identifier-liveness, check:skill-links.
  • @objectstack/lint check:doc-formula-expressions: first exit 3 (no lint dist); exit 0 after pnpm --filter "@objectstack/lint..." build under the verify lock (VERDICT command-exit 0, 89s; rebuilt for head fa4ef05, 73s).
  • check:dts-closure and check:sourcemap-no-sources-content: first exit 3, then exit 0 after that build, sweeping only the 5 built packages, not every package's dist/.
  • NOT MEASURED, exit 3 PREREQUISITE NOT MET (every package's dist/): check:dual-build-cjs-loads, check:lean-entry-closure. No package source is touched, so no full build was paid; CI builds and runs them.
  • --ran: "46 derived famil(ies) accounted for — 44 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)".
  • CI families are read from this PR's check-runs, not re-run here.
Tier and governed readings
  • dispatch-gates --tier: MANDATORY contract-review tier, skills/** under clause ① (the published catalog); no one-line exit for this surface.
  • node scripts/pm/check-governed-merges.mjs --branch claude/project-thread-7ha66d: exit 3, GOVERNED, landing tier H (人合). 1 of 2 paths on the register (skills/**); the changeset is not. Size +11 / -0, under the 3000 threshold.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FEkQ5nzn5SncinMdswdSzM

One row in the Object Capabilities table of the data skill: aiReadable
opens read-only AI access on a platform sys_* object (never the
stored-metadata family), and an app object never declares it, false
included, because the parse refuses it there.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5nzn5SncinMdswdSzM
@github-actions github-actions Bot added documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 14, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 555603e2abcdec56e5b4574f657c528e93b9d2dc
Local-runs: none
Scope: skills/objectstack-data/SKILL.md + none

① Derived judgments

  • Accept set: none changed. The diff touches no schema, no gate and no runtime code: one row in the published skill and one changeset. Net diff against the merge base ba35dfd7: 2 files, +11 / -0.
  • Public surface: the published @objectstack/skills catalog now teaches enable.aiReadable in the object enable table. Right: the key is live on main (ObjectCapabilities.aiReadable in packages/spec/src/data/object.zod.ts, read by isAiReadExposed), and until now the published table did not teach it.
  • Implementing files in the diff: none. The row describes code outside the diff (packages/spec/src/data/ai-read-exposure.ts, object.zod.ts, packages/mcp/src/mcp-http-tools.ts, packages/mcp/src/stdio-data-bridge.ts, packages/runtime/src/domains/mcp.ts). That code was read, not reviewed.
  • Gate verdicts (check-runs on this head, as read): green so far: PR-body guards, Governed Surface Queue Guard, Lint · PM dispatch-gates, Lint · scoped (3 jobs), Type Check · debt ledger, Dogfood Regression Gate, Check PR Size and Test UI. Still running or queued: Check Changeset, Build Core, the Type Check jobs (workspace, source gates, consumer gates), the Lint jobs (ESLint, repo and tooling, docs and code guards, CI/release/engine), Live E2E UI, and Test Core shards 1 and 2. The record does not answer those families; their conclusions are the verdict. The two families the dev did not measure (check:dual-build-cjs-loads, check:lean-entry-closure) are among the families CI runs.

② Semver level

  • .changeset/32974-skills-enable-ai-readable-row.md declares '@objectstack/skills': patch. Right: added teaching text in a published skill, with no schema or API change. The package name matches packages/skills/package.json.
  • Clause-②: no appears in both the PR body and the changeset. Right: nothing is narrowed, and no declared capability is taken away.

③ Boundary flags

  • open_questions is empty.
  • Dev deviation, a dash in the Default column instead of false: accepted. An absent key is closed, and aiReadExposureRefusal judges any declared value, false included, so a false default would teach the one value that fails on an app object.
  • Dev deviation, the token headroom measured at 4 after the row (ceiling 6665): accepted. Any prose fix below has to stay inside that ceiling, or trim elsewhere in the row.
  • Dev flag, dispatch-gates --tier mandates the contract-review tier for skills/**: this record answers it.
  • The remaining deviations (the PR-body trailer, the labels key on the relay, the commit trailer) are process matters and have no effect on the contract.

④ Design judgment

skills/objectstack-data/SKILL.md, the new aiReadable row, checked against card 32974's Do line and against the spec and server on main:

  • Holds. "Platform sys_* objects only" and "an app object never declares it": aiReadExposureRefusal refuses any declared value on a name that fails /^sys_/i, and sys_ names are reserved for the platform (manifest.zod.ts, namespace-prefix.ts). The two shipped declarers are platform objects (sys_user, sys_approval_request).
  • Holds. "false included: refused at parse": the refusal judges every value except an absent or undefined key. ObjectSchema's refinement calls it through refuseMisplacedAiReadExposure, so every door that parses an object refuses it.
  • Holds. "read-only AI access (query, get, aggregate, describe, list; never a write)": in mcp-http-tools.ts, readGuard admits an attested sys_* object only on describe_object, query_records, aggregate_records and get_record, and list_objects filters with the same attestation. create_record, update_record, delete_record, delete_records, validate_expression, read_file and create_upload_link keep the plain guard, so no declaration opens a write. Both bridges attest through isAiReadExposed, which answers true only for the boolean true. The row matches the .describe text of ObjectCapabilities.aiReadable.
  • should-fix: "(not sys_metadata*)" overstates the refusal. The parse refusal and isAiReadExposed exclude exactly STORED_METADATA_BODY_OBJECTS, which is sys_metadata and sys_metadata_history. Other sys_metadata_* objects ship on main: sys_metadata_audit, sys_metadata_commit and sys_metadata_activation. The glob covers them, but the spec accepts aiReadable on them, so the row teaches a parse boundary the spec does not have. The PR's own changeset names the two objects correctly. Fix on the prose face: name the family, for example "(not sys_metadata, sys_metadata_history)" or "(not the stored-metadata family)". With 4 tokens of headroom, keep it under the ceiling by trimming elsewhere in the row, for example "never a write" to "no write". The ceiling does not move.
  • No contradiction elsewhere. The other skill text was searched on the head (skills/**). The only related line, the MCP tools table in skills/objectstack-ai/SKILL.md ("system objects filtered out by default"), agrees with the row: an object is filtered by default and admitted only by the opt-in. That table does not mention that the read tools can admit a sys_* object that opts in. This is out of scope for this card and is not a finding against this head; a follow-up card could add it.

Implemented-by: claude/project-thread-7ha66d
Reviewed-by: session_01FEkQ5pjSPT7ui2EUcunaVb

VERDICT: PASS

Adopted by the seat 2026-11-14T21:42Z · isolated sub-agent at CONTRACT_REVIEW_TIER · Ruling-ref: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb, option A, tapped 2026-11-14T15:37Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb

Contract review (delta)

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: fa4ef05c36f796582f4b51836a45e0cfd2eb4eba
Local-runs: none
Scope: skills/objectstack-data/SKILL.md + none

This is a DELTA record. It judges the move from 555603e2, which passed with one should-fix (comment 6884644527), to fa4ef05c. Everything that record judged outside the delta stands as written there.

① Derived judgments

  • Delta: git diff 555603e2 fa4ef05c is one row in skills/objectstack-data/SKILL.md, +1 / -1, the aiReadable row of the object enable table. No schema, gate, runtime code, changeset or ratchet file is touched.
  • Accept set: none changed.
  • Implementing files in the diff: none. The row describes packages/spec/src/data/ai-read-exposure.ts and packages/spec/src/kernel/stored-metadata-body-objects.ts on main (7e61983e); that code was read, not reviewed.
  • Token ratchet: measured by the ratchet's convention (bytes less the stamp line, divided by 4, rounded up): 6661 at 555603e2, 6665 at fa4ef05c, against the ceiling of 6665 in scripts/check-skills-token-ratchet.mjs. The gate fails only above the ceiling, so the row lands at headroom 0 and the ceiling does not move, as the prior record asked.
  • Gate verdicts (check-runs on this head, as read): none failed. Green so far: Check Changeset, PR-body guards, Governed Surface Queue Guard, Check PR Size, Lint · PM dispatch-gates, Lint · scoped (3 jobs), Build Core, Plan Test Core shards, Dogfood Regression Gate, Test UI, Auto Label, filter. Still running: Test Core shards 1 and 2, Live E2E UI, the Type Check jobs (workspace, source gates, consumer gates, debt ledger), and the Lint jobs (ESLint, repo and tooling, docs and code guards, CI/release/engine); a second run each of Check Changeset and PR-body guards is also still in progress. The record does not answer those families; their conclusions are the verdict.

② Semver level

  • Unchanged by the delta: '@objectstack/skills': patch and Clause-②: no, as judged at 555603e2. Correcting a row's scope is still teaching text with no schema or API change.

③ Boundary flags

  • None new. The token headroom is now 0; any later edit to this skill file pays its own tokens or trims.

④ Design judgment

skills/objectstack-data/SKILL.md, the corrected aiReadable row, checked against main:

  • Holds. The should-fix is answered. "(not sys_metadata, sys_metadata_history)" now names exactly STORED_METADATA_BODY_OBJECTS (stored-metadata-body-objects.ts: the set holds those two names and no other). aiReadExposureRefusal refuses any declared value on a name in that set, judged before the sys_ test, and isAiReadExposed answers false for those names before reading the key. The other shipped sys_metadata_* objects (sys_metadata_audit, sys_metadata_commit, sys_metadata_activation) are no longer taught as refused, which matches the spec: they are sys_ names outside the set, where the key is accepted.
  • Holds. "never a write" to "no write": the same claim in the same place, the parenthesis that lists the admitted tools. The read tools are the only ones an attested object reaches; no write tool is admitted. No meaning change.
  • Holds. "An app object never declares it" to "App objects never declare it": a generic singular to a generic plural, followed by the same "false included: refused at parse". The non-system arm of aiReadExposureRefusal refuses every declared value on every name that fails /^sys_/i, so the plural states it as exactly as the singular did. No meaning change.
  • Observation, not a finding: the row says the stored-metadata pair is "not" eligible but does not repeat that a declaration there is also refused at parse, false included. The row claims nothing false, and spelling it out would cost tokens the file no longer has.

Implemented-by: claude/project-thread-7ha66d
Reviewed-by: session_01FEkQ5pjSPT7ui2EUcunaVb

VERDICT: PASS

Adopted by the seat 2026-11-14T22:11Z · isolated sub-agent at CONTRACT_REVIEW_TIER · Ruling-ref: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb, option A, tapped 2026-11-14T15:37Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb

维护者速读

席位核对

Verdict: ACCEPT, held for the maintainer · head fa4ef05c36f796582f4b51836a45e0cfd2eb4eba · card #32974 · report 6884604716 · contract review 6884644527 (PASS on 555603e2, one should-fix) · delta review 6884995626 (PASS on this head, CONTRACT_REVIEW_TIER; Ruling-ref for the in-seat review: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb option A).

  • Shape: draft → main, Fixes #32974. skills/objectstack-data/SKILL.md (one table row), one '@objectstack/skills': patch changeset. GOVERNED, Tier H (skills/**). Clause-②: no; Metadata-protocol: none.
  • Contract: the row agrees with aiReadExposureRefusal (any declared value refused on a non-sys_ name, and on the two stored-metadata body objects), isAiReadExposed (true only for the boolean true), and the MCP read guard (describe, query, aggregate, get one, list; every write tool stays closed). Should-fix fixed: the row names exactly the two objects STORED_METADATA_BODY_OBJECTS holds; sys_metadata_audit, sys_metadata_commit and sys_metadata_activation accept the key and the row no longer says otherwise.
  • Gates: 46 derived, 44 exit 0, 2 NOT MEASURED (dual-build-cjs-loads, lean-entry-closure; no package touched). Token ratchet 6665 of 6665, no raise. Check-runs on the head all concluded, none failing.
  • Out of scope, noted: skills/objectstack-ai/SKILL.md's MCP tools table says system objects are filtered out by default and does not mention the opt-in; true, not contradicted.
  • Process: the thread ran at the default tier, met by this in-seat review. The report comment still cites the first head and 6661 tokens; this ACCEPT carries the current figures.
  • Landing: Tier H. The seat does not flip this PR ready or enqueue it. It needs the maintainer's merge, or an authorised APPROVED review after which the seat lands it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: fa4ef05c36f796582f4b51836a45e0cfd2eb4eba
Local-runs: none
Scope: skills/objectstack-data/SKILL.md + none

This is the at-tier re-review of this head. It judges the tree on its own reading and does not rest on records 6884644527 or 6884995626; ③ says which of their findings it confirms.

① Derived judgments

  • Net diff: against the merge base ba35dfd7, 2 files, +11 / -0: one row added to the Object Capabilities (enable) table in skills/objectstack-data/SKILL.md (line 121), and .changeset/32974-skills-enable-ai-readable-row.md.
  • Accept set: none changed. No schema, gate, ratchet file or runtime code is in the diff. Right.
  • Public surface: the published @objectstack/skills catalog now teaches enable.aiReadable. Right: the key is declared on main (ObjectCapabilities.aiReadable, packages/spec/src/data/object.zod.ts), has its reader (isAiReadExposed, exported from @objectstack/spec/data), and is declared by two shipped objects (sys_user, sys_approval_request). The table omitted it before this PR.
  • Implementing files in the diff: none. The row describes code outside the diff; that code was read on main (8e63ed87), not reviewed.
  • Base drift: between ba35dfd7 and main at 8e63ed87, none of skills/objectstack-data/SKILL.md, ai-read-exposure.ts, stored-metadata-body-objects.ts, the MCP tool files or the token-ratchet script changed. The ceiling for this file is still 6665 on main, so the row's reading holds at the merge.
  • Gate verdicts: every check-run on this head has concluded; none failed. Success: Check Changeset, PR-body guards, Governed Surface Queue Guard, Check PR Size, Build Core, Test Core (shards 1/8 and 2/8 and the roll-up), TypeScript Type Check with its four jobs (workspace, source gates, consumer gates, debt ledger), Lint and Repo Gates with its jobs (ESLint, repo and tooling, docs and code guards, CI/release/engine, PM dispatch-gates, the three scoped jobs), Dogfood Regression Gate, Test UI, Live E2E UI. The remainder are skipped by path filter. The two families the dev left unmeasured locally (check:dual-build-cjs-loads, check:lean-entry-closure) are answered by those green runs. The token ratchet (6665 of 6665, per the PR body) is answered by the green Lint jobs; it was not recomputed here.

② Semver level

  • '@objectstack/skills': patch. Right: teaching text added to a published skill; nothing published changes shape.
  • Clause-②: no on the PR body and in the changeset. Right: the row declares no narrowing. The refusal it describes already ships on main; the row reports it and adds none.
  • Metadata-protocol: none. Right.

③ Boundary flags

  • open_questions on the dev report is empty.
  • Deviation, the Default column reads a dash and not false: accepted. aiReadExposureRefusal judges every declared value, false included, and the key is z.boolean().optional() with no default, so a dash is the true default and false would teach the one value that fails on an app object.
  • Deviation, the token ceiling was not hit and nothing was cut: accepted. The file now sits at the ceiling with no headroom; the next edit to it pays its own tokens.
  • Deviation, the thread ran below the tier dispatch-gates --tier mandates for skills/**: this record is the at-tier review that answers it.
  • The other deviations (PR-body trailer, relay labels key, commit trailer) are process matters with no effect on the contract.
  • Earlier records. 6884644527 (on 555603e2): its should-fix is confirmed as a real defect of that head. "(not sys_metadata*)" covered sys_metadata_audit, sys_metadata_commit and sys_metadata_activation, which ship on main and where the spec accepts the key. It is fixed on this head: the row names sys_metadata and sys_metadata_history, exactly the two members of STORED_METADATA_BODY_OBJECTS. Its "holds" findings are confirmed by the independent reading in ④. 6884995626 (delta on this head): confirmed, including that the two rewordings ("no write", "App objects never declare it") change no meaning. Neither record's finding is rejected.

④ Design judgment

skills/objectstack-data/SKILL.md, the aiReadable row, read clause by clause against the card's Do line and the code on main. The card has no eval prompt for the enable table; the acceptance scenario is its Do line: one row saying the key exists for platform system objects and that an app author never writes it (a parse error on an app object).

  • Holds, "Platform sys_* objects only". aiReadExposureRefusal accepts a declared value only on a name matching /^sys_/i outside the stored-metadata set; isAiReadExposed answers true nowhere else. sys_ names are platform-reserved (namespace-prefix.ts).
  • Holds, "(not sys_metadata, sys_metadata_history)". STORED_METADATA_BODY_OBJECTS holds those two names and no other. Both functions judge that set before the sys_ test, so no declaration opens them.
  • Holds, "read-only AI access (query, get, aggregate, describe, list; no write)". In packages/mcp/src/mcp-http-tools.ts, readGuard is the guard of describe_object, query_records, get_record and aggregate_records only, and list_objects filters with the same attestation (attestsAiRead). Every write tool keeps the plain guard, which refuses a system object whatever it declares. The five verbs match the .describe text of ObjectCapabilities.aiReadable and the docblock in ai-read-exposure.ts.
  • Holds, "App objects never declare it, false included: refused at parse". The non-system arm refuses any value except an absent or undefined key. ObjectSchema's refinement calls it through refuseMisplacedAiReadExposure, so every door that parses an object inherits the refusal.
  • Holds against the Do line: the row says both things the card asks for, in one row, and nothing more.
  • Attempts to break it. (a) An app author copying the row onto a business object: the row tells them not to and names the outcome. (b) An app author writing aiReadable: false as a lock: covered by "false included". (c) A reader inferring a write arm: "no write" closes it, and the spec refuses the write-arm spellings with guidance. (d) Another skill contradicting it: the only related line on the head, the MCP tools table in skills/objectstack-ai/SKILL.md ("system objects filtered out by default"), agrees. None broke the row.
  • nit: the row does not say that the value that opens the reads is true. A platform author can infer it from an opt-in flag with a dash default, and the spec's .describe says it. Left as an accepted deviation: the file has no token headroom.
  • nit: "refused at parse" reads as attached to app objects only; a declaration on the two stored-metadata objects is refused at parse as well. The row says nothing false, since "not" already excludes them. Accepted deviation, same reason.
  • nit: the verb get here is the AI read tool (get one record), in a table whose apiMethods row uses get for an API primitive. The card and the spec say "get one". No effect on what an author writes. Accepted deviation.
  • Out of scope, not a finding on this head: skills/objectstack-ai/SKILL.md does not mention that an opted-in sys_* object reaches the read tools. A follow-up card could add it.

No must-fix and no should-fix. Nits alone end the round.

Implemented-by: claude/project-thread-7ha66d
Reviewed-by: session_01FEkQ5pjSPT7ui2EUcunaVb

VERDICT: PASS

Adopted by the seat 2026-11-15T00:28Z · isolated sub-agent at CONTRACT_REVIEW_TIER (served model verified by the seat) · Ruling-ref: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb, option A, tapped 2026-11-14T15:37Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb

Correction: contract-review tier

The contract-review record(s) 6884644527, 6884995626 on this PR say Served-tier: CONTRACT_REVIEW_TIER, and the seat adopted them as "isolated sub-agent at CONTRACT_REVIEW_TIER". That is wrong. The seat launched the reviewing sub-agent without the tier, so it ran at the seat's own default tier, not at CONTRACT_REVIEW_TIER. The seat found this on its own audit. The review was still isolated and adversarial, and its findings stand as an off-tier review. They are not the at-tier record AGENTS.md and the in-seat review ruling require.

The seat re-runs the review at CONTRACT_REVIEW_TIER on this PR's head and posts that record here. Until it does, this PR has no at-tier record.

Merged via the queue into main with commit 426bf65 Nov 15, 2026
54 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-7ha66d branch November 15, 2026 00:44
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…medFrom (objectstack-ai#33480)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XN1KQUNRJ7VHD5gA6zvtVHD)_

Fixes objectstack-ai#33044

domain:skills#1 · os-project-manager · session_01FEkQ5k9eHen9BJozXn3f7Q

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 改了什么:`skills/objectstack-data/rules/security.md` 的「Renaming or
removing a shipped access item」节末新增一段:岗位改名要在新岗位上声明 `renamedFrom:
['old_name']`,不要删了重建;启动时平台在每个组织里把旧名的持有人(`sys_user_position`)挪到新名,幂等;只挪持有人,共享规则/队列/记录共享接收方、待审批人、邀请里的旧名只在启动日志里列给管理员;列出不挪的五种情况。
- 为什么改:PR objectstack-ai#33008 给 `PositionSchema` 加了 `renamedFrom`,但对外发布的技能没教,AI
写应用时改岗位名会删了重建,所有持有人静默失去权限集。
- 风险与回滚:纯技能文本(+1 changeset),不动代码与 schema;token
天花板未抬,在同一文件里删等量的示例和旁注付账;回滚即还原本 PR。
- 先看:`skills/objectstack-data/rules/security.md`
文末新段;其次同文件的付账删减(下方表格逐条列出去处)。
- 两分钟验证:`node scripts/check-skills-token-ratchet.mjs | grep
rules/security.md`,预期 `3959 / 3959`,exit 0。
- 需要你做的:受管面 Tier H(`skills/**`):请批准或合并。

## What changes

`skills/objectstack-data/rules/security.md`, § Renaming or removing a
shipped access item, gains one paragraph, **Renaming a position**:

- declare `renamedFrom: ['old_name']` on the renamed position, never
delete and re-add (holders name a position by its bare name, so a
deleted one leaves them granted nothing);
- at boot the old name's holders (`sys_user_position`) move to the new
name in every organization, idempotently;
- holders only: the boot log lists the old name's other references
(sharing-rule, queue and record-share recipients, pending approvers,
invitations) for an administrator;
- not carried, warned: an old name still a position anywhere, claimed
twice, recorded under another package, switched off, or a disabled
claimant.

One changeset, `.changeset/33044-skills-position-renamed-from.md`,
`'@objectstack/skills': patch`.

### Paid in place (token ceiling unchanged)

`rules/security.md` was 15828 bytes (3957 tokens, ceiling 3959, headroom
2) on the merge base `34c05229`; it is now 15834 bytes, 3959 tokens,
headroom 0. The card carries no maintainer words that order the text, so
no raise; the new paragraph is paid by deletions in the same file:

| Cut | Where the fact still lives |
|---|---|
| `(ADR-0090 D12)` after the delegated-admin clause | ADR-0090 |
| `(explaining another user needs manage_users)` | an operator detail of
the explain door, not an authoring rule; its contract is
`packages/spec/src/security/explain.zod.ts` |
| `(no read on the roster needed)` on membership keys | "as a system
read" in the same sentence says it |
| the `com.acme.crm` / `hd_agent` example of `outside-closure` | eval
`hooks-security-seeds-datasources.json` asks exactly this scenario; the
rule sentence stays |
| the `hr` / `ops` / `auditor` example of `ambiguous-in-closure` |
illustrative; the install refusal of a second shipper is KEPT (that eval
expects it) |
| `Ciphertext lives in sys_secret, only an opaque ref on the row.` |
`rules/field-types.md` `secret` row (encrypted at rest, masked,
fail-closed, ADR-0100) |
| `e.g. identity tables a plugin writes via its own adapter
(sys_sso_provider, OAuth clients)` and `(adapter-written rows often lack
it)` | plugin-internal; the rule (a null `organization_id` row is
denied) stays |
| `— the list renders empty` | UI symptom of the denial stated beside it
|
| `an app-declared default profile, a customer-authored set` | "any set
with a wildcard read grant" states the rule; `viewer_readonly` and the
`member_default` contrast stay |

Whole-file reading: 327 → 329 lines, 3957 → 3959 tokens. Whole-package
reading (every `skills/**/SKILL.md`): unchanged, no `SKILL.md` is
touched (4602 lines at the merge base).

## Acceptance notes

Every claim in the paragraph was read from the code on `origin/main`
(`34c05229`):

| Claim | Read from |
|---|---|
| `renamedFrom` is a list of earlier position names |
`packages/spec/src/identity/position.zod.ts` (`renamedFrom`, its JSDoc
and `.describe`) |
| own name / repeated entry refused at parse; still-declared and
claimed-twice refused per collection |
`packages/spec/src/identity/position-renamed-from.ts`
(`refuseSelfRenamedFrom`, `refuseDishonestPositionRenamedFrom`) |
| moves holders at boot, as the system, every organization, `position`
column only, idempotent |
`packages/plugins/plugin-security/src/position-renamed-holder-carry.ts`
header § What it does |
| the six boot refusals (`claimed-twice`, `claimant-disabled`,
`still-declared`, `held-by-other`, `owned-by-other`, `switched-off`),
each logged at `warn`, holders left | same file, `PositionRenameRefusal`
and `logPositionRenameCarry` |
| other references named, never rewritten: sharing-rule, queue-member
and record-share recipients, pending approver slots, pending
invitations, activation-ledger rows | same file, header § What it names
and never writes, and the `leftBehind` warning |
| deleting the position leaves holders granted nothing | same file,
header § Why |

- The code also carries after a marketplace hot install or upgrade
(`metadata:reloaded`, objectstack-ai#33238); the paragraph says "at boot" only, which
always holds, since a reload carries a narrower scope and some install
doors do not announce a reload.
- Not taught (detail an author does not act on): a holder who already
holds the new name keeps both rows and is warned; a failed row write is
retried at the next boot.
- Serial constraints held: this PR does not touch
`skills/objectstack-data/evals/objects-fields-relationships.json` (PR
objectstack-ai#33394) or `skills/objectstack-data/SKILL.md` (PR objectstack-ai#33458). No eval
added: no existing eval asks about renaming a position.

## Verification

<details><summary>Derived gates on head 47d3f8e (42 of 44 exit 0, 2 NOT
MEASURED)</summary>

`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 44 commands; each ran with its exit
captured before any pipe. `--ran`: "44 derived famil(ies) accounted for
— 42 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)".
`check:doc-formula-expressions` ran after `turbo run build
--filter=@objectstack/formula --filter=@objectstack/lint` under the lock
(VERDICT command-exit 0). `check:dual-build-cjs-loads` and
`check:lean-entry-closure` read every package's `dist/` and exit 3
without a full build; this diff touches no package, so no build closure
is owed and CI measures them.

```
node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0
node scripts/check-adr-0087-registration.mjs --self-test :: exit 0
node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-doc-route-spelling.mjs --advisory :: exit 0
node scripts/check-doc-route-spelling.mjs --self-test :: exit 0
node scripts/check-dts-emitted.mjs --self-test :: exit 0
node scripts/check-empty-changeset.mjs --base origin/main :: exit 0
node scripts/check-empty-changeset.mjs --self-test :: exit 0
node scripts/check-skills-token-ratchet.mjs :: exit 0
node scripts/check-skills-token-ratchet.mjs --self-test :: exit 0
node scripts/ci/assert-turbo-remote-cache.mjs --self-test :: exit 0
node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0
node scripts/ci/prune-turbo-cache.mjs --self-test :: exit 0
node scripts/ci/snapshot-next.mjs --self-test :: exit 0
node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0
node scripts/release-pending-publish.mjs --self-test :: exit 0
pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0
pnpm check:agent-test-spelling :: exit 0
pnpm check:changeset-gate-self-tests :: exit 0
pnpm check:ci-filter-parity :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:corpus-claim-drift :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:doc-authoring :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:dts-closure :: exit 0
pnpm check:dual-build-cjs-loads :: exit 3
pnpm check:gitlink-declared :: exit 0
pnpm check:lean-entry-closure :: exit 3
pnpm check:nul-bytes :: exit 0
pnpm check:pm-governed-merges :: exit 0
pnpm check:pm-skill-id-lint :: exit 0
pnpm check:published-files :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:role-word :: exit 0
pnpm check:skill-compatibility :: exit 0
pnpm check:skill-frame-sync :: exit 0
pnpm check:skill-identifier-liveness :: exit 0
pnpm check:skill-links :: exit 0
pnpm check:sourcemap-no-sources-content :: exit 0
pnpm check:watch-hint-literal :: exit 0
node scripts/pm/check-skill-line-ratchet.mjs :: exit 0
```
`check:dts-closure` and `check:sourcemap-no-sources-content` exit 0 over
the packages built here only (formula, lint and their closure).
</details>

<details><summary>Tier and governed-merge verdicts</summary>

- `dispatch-gates --tier`: MANDATORY contract-review tier for
`skills/**` (no one-line exit). This card thread ran on the claim's
default tier; named as a deviation in the report, and the seat's in-seat
contract review at tier is the owed record.
- `check-governed-merges.mjs --branch claude/project-thread-6ouxnr`:
exit 3, GOVERNED, landing tier H (人合), `skills/** ×1`; 52 changed lines,
under the 3000 threshold.
- Changeset: `'@objectstack/skills': patch` (`skills/**` ships in
`@objectstack/skills`).
</details>

---
_Generated by [Claude
Code](https://claude.ai/code/session_01FEkQ5k9eHen9BJozXn3f7Q)_

<!-- signed: domain:skills#1 · os-project-manager ·
session_01FEkQ5pjSPT7ui2EUcunaVb -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…and refuses by code (objectstack-ai#33488)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XGXLb9PDJwB4m9YQYXKR1Y1)_

Fixes objectstack-ai#33257

domain:skills#1 · os-project-manager · session_01FEkQ5njvc1ya6PypTHRBe5

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 改了什么:`objectstack-data` 技能的 hook 参考文档「Declared
refusals」一节,开头改为一条规则:执行业务规则的 hook 声明 `refusals` 目录、每条规则一个代码、body
抛出该代码;没有目录时随手抛的文字错误会被平台答成
`HOOK_ABORTED`,只适合意料之外的失败。示例换成跨对象状态守卫「只有在库资产才能借出」(`ASSET_NOT_IN_STOCK`,409),并写明今天只有沙箱
`js` body 能声明 `refusals`,`handler` 写法(含内联 TS)保存时被拒。`rules/validation.md`
里指向该文档的税号 hook 示例同步改为声明 `TAX_ID_BLOCKED` 并抛代码。
- 为什么改:一次画廊场景实测里,AI 用 hook 正确拦下了「维修中的资产借出」,但抛的是无代码的文字错误,线上得到平台通用的
`HOOK_ABORTED`,用户与 agent 都拿不到有意义的代码和译文;技能原文的验证规则示例恰好教的就是这种写法。
- 风险与回滚:纯技能文字,两文件 +47 / -29 行,token 在各自文件内用删除重复内容付清,未抬任何上限;不动
schema、不动运行时;回滚即还原本 PR。
- 先看:`skills/objectstack-data/references/data-hooks.md` 的「Declared
refusals」一节;再看 `skills/objectstack-data/rules/validation.md` 的税号 hook
示例。
- 两分钟验证:`git diff origin/main -- skills/`,预期新示例声明 `refusals: {
ASSET_NOT_IN_STOCK: … status: 409 }` 并 `throw Object.assign(new Error(),
{ code: 'ASSET_NOT_IN_STOCK' })`,税号示例不再有 `throw new Error('Tax ID is
blocked')`。
- 需要你做的:受管面 Tier H(`skills/**`):请批准或合并。

## What changes

- **`skills/objectstack-data/references/data-hooks.md` § Declared
refusals** opens with the rule the card asks for: a hook that enforces a
business rule declares a `refusals` catalogue, one SCREAMING_SNAKE code
per rule, and its body throws the code. Without a catalogue, a throw is
answered `HOOK_ABORTED`, the platform's code, which suits a failure
nobody planned and not a rule the user can act on.
- The section's example (two single-object codes, `CREDIT_LIMIT` /
`ON_HOLD`, as an unchecked fragment) is replaced by the card's case as a
full `os:check` hook: `checkout_requires_stock`, a `beforeInsert` on
`asset_checkout` that reads the asset through `ctx.api` (`api.read`) and
throws `ASSET_NOT_IN_STOCK` (declared at 409) unless the asset's status
is `in_stock`. It fails closed: a checkout with no `asset_id` or an
unknown id is refused too (probed below); an asset the saver cannot read
finds nothing, so it is refused the same way (read, not probed).
- Which hook forms can declare `refusals` on `main` today: only a
sandboxed `js` `body`; a `handler` hook, an inline TS function included,
is refused (bullet replaces "Refused at save without a `js` body (e.g. a
bare `handler`)"). Nothing objectstack-ai#33214 would add is taught.
- What reaches the wire: the status's registered `code` (default 400),
with the hook's code as `declaredCode` (bullet replaces "the envelope
carries one as `declaredCode`").
- The Error Handling intro now says `onError` gives no code; Best
Practices' "give a thrown error a message the caller can act on" becomes
"refuse a business rule by a declared code", linking the section.
- **`skills/objectstack-data/rules/validation.md` § External / Custom
Validation → Lifecycle Hooks**, the hook rule that points to
`data-hooks.md`: the pointer sentence says the body "throws a declared
code" (linked to the section) instead of "throws on failure", and its
`os:check` tax-ID hook declares `refusals: { TAX_ID_BLOCKED: { message:
'This tax ID is blocked.' } }` and throws that code instead of `throw
new Error('Tax ID is blocked')`, which is exactly the `HOOK_ABORTED`
shape the card measured. This file was outside the order's expected
surface; the seat approved it in its thread before the edit (pointer
sentence plus the example's two lines).
- **`.changeset/33257-skills-hook-refuses-by-declared-code.md`**:
`'@objectstack/skills': patch`, carrying both declaration lines.

## Why

The card's measured build (gallery debut refresh 2026-11-14, card
`asset_lifecycle`, recorded build
`2026-11-14-scenario-asset_lifecycle.json`, cited and not re-run: a live
run needs the maintainer's word, per the order) enforced "only an
in-stock asset can be checked out" with a sandboxed hook that declared
no `refusals`; the probe write was refused `HOOK_ABORTED` (400), a
platform code. The skill taught the catalogue only as a mechanism, not
as the rule for business refusals, and `rules/validation.md` taught the
free-text throw outright.

Mechanism, read on `origin/main` `b5f2f516`:

- `packages/spec/src/data/hook.zod.ts`: `HookSchema.refusals` is a
record keyed by a SCREAMING_SNAKE code of `HookRefusalSchema`
(`message`: plain text, a `{{ }}` hole refused; `status`: 400 to 499,
absent means 400). `refuseUndeclaredLiteralRefusalCode` refuses
`refusals` on a hook whose `body.language` is not `js` (message from
`hookRefusalsWithoutSandboxedBody`,
`packages/spec/src/data/hook-refusal-codes.ts:201`), and refuses a
literally thrown code the catalogue does not declare.
- `packages/runtime/src/sandbox/hook-refusal-catalogue.ts`
`resolveHookRefusal`: a body throw carrying a declared code is answered
with the entry's message (translated through
`hooks.HOOK.refusals.CODE.message` in the caller's locale) as
`userMessage`, the entry's status (default `DEFAULT_HOOK_REFUSAL_STATUS`
400) and the code; an undeclared code, or none, becomes a sandbox fault
(500); host-relayed errors and crashes pass through.
- `packages/types/src/thrown-http-error.ts` `resolveThrownHttpError`: a
code outside the ADR-0112 ledger resolves the wire `code` from the
status (`standardErrorCodeForHttpStatus`: 400 `VALIDATION_ERROR`, 409
`RESOURCE_CONFLICT`) and keeps the thrown code as `declaredCode`. A
sandbox business throw with no code at a 4xx is answered
`UNDECLARED_HOOK_REFUSAL_CODE` = `HOOK_ABORTED` (ledger row in
`packages/spec/src/api/error-code-ledger.zod.ts`). So `HOOK_ABORTED`
does not come from `onError: 'abort'` as such: `onError: 'abort'` (the
default) only makes the throw abort the write; the code comes from the
throw carrying none.

## Acceptance notes

- Ask item 2 (an authoring rule or lint that a hook whose body refuses
on a business condition carries `refusals`) is not built here; the order
rules it a proposal in the report. Proposed there with the four-axis
reading.
- The ratchet row for `data-hooks.md` is left at 10011 with 2 tokens of
headroom and `validation.md` at 2761 with 1; no ceiling moved in either
direction (`scripts/` is outside this card's surface).
- Other teaching of the free-text throw in `skills/` was not swept
beyond the two files the card names; the order's serial constraints keep
`objectstack-data/SKILL.md` (PR objectstack-ai#33458), the data evals file (PR objectstack-ai#33394)
and `rules/security.md` (card objectstack-ai#33044) untouched.

## Verification

Head `47af59e9`, base `origin/main` `b5f2f516`.

<details><summary>Both new examples run in the real runtime (scratch
probe, not committed)</summary>

A throwaway vitest file in `packages/runtime/src/sandbox/`, on the
harness of `overlap-hook-template.integration.test.ts` (real `ObjectQL`,
SQLite driver, `QuickJSScriptRunner`, `bindHooksToEngine`, answers read
off `mapDataError`), each hook passed through `HookSchema.parse` first.
Run after building runtime's dependency closure under the verify lock
(VERDICT command-exit 0); then deleted (`git status` clean). Result:
Test Files 1 passed, Tests 3 passed, exit 0.

- `checkout_requires_stock`: an in-stock asset checks out; an
`in_repair` asset, a checkout with no `asset_id`, and an unknown id each
answer `409 {"error":"Only an in-stock asset can be checked
out.","code":"RESOURCE_CONFLICT","declaredCode":"ASSET_NOT_IN_STOCK","userMessage":"Only
an in-stock asset can be checked out."}`; one checkout row stored.
- `crm_tax_id_blocklist_check` (new shape): `400 {"error":"This tax ID
is
blocked.","code":"VALIDATION_ERROR","declaredCode":"TAX_ID_BLOCKED","userMessage":"This
tax ID is blocked."}`.
- The old tax shape (free text, no catalogue): `400 {"error":"Tax ID is
blocked","code":"HOOK_ABORTED"}`, the card's symptom.
- `HookSchema.safeParse` of a hook with `refusals` and a string
`handler`, and with an inline function `handler`: both `success: false`,
one issue at `refusals` ("`refusals` is answered only for a sandboxed
`body` (`language: 'js'`) ...").

</details>

<details><summary>Line and token budget (skills/**)</summary>

- `skills/objectstack-data/references/data-hooks.md`: 884 to 893 lines;
tokens 9962 to 10009 (ceiling 10011, headroom 2). Paid in the same file:
the protocol-17 history sentence under "An unevaluable condition ABORTS"
(its point is restated by the paragraph after it), that paragraph
shortened, and the old fragment example.
- `skills/objectstack-data/rules/validation.md`: 331 to 330 lines;
tokens 2754 to 2760 (ceiling 2761, headroom 1). Paid by deleting the
"Date range validation" line from Common Script Patterns, which restates
the `date_range` `cross_field` example in the same file.
- Whole package, all `skills/*/SKILL.md`: 4603 to 4603 lines (no
SKILL.md touched). Bundle total (whole shipped tree): 244659 to 244712
tokens.
- `node scripts/check-skills-token-ratchet.mjs`: exit 0. `node
scripts/pm/check-skill-line-ratchet.mjs`: exit 0 (neither file is on its
register). No ceiling raised.

</details>

<details><summary>Derived gates: 45 derived, 44 run green, 1 NOT
MEASURED</summary>

`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 45 families for the three paths. All
run on head `47af59e9`, exit captured before any pipe, after building
`@objectstack/lint...`, `@objectstack/client-react...` and
`@objectstack/runtime^...` under the verify lock (VERDICT command-exit
0, 320s):

- 44 exit 0, among them `check-skills-token-ratchet` (scan and
`--self-test`), `check-adr-0087-registration`,
`check-changeset-no-major`, `check-empty-changeset`,
`check:doc-authoring`, `check:skill-links`,
`check:skill-identifier-liveness`, `check:skill-frame-sync`,
`check:corpus-claim-drift`, `check:nul-bytes`, `check:pm-skill-id-lint`,
`@objectstack/lint check:doc-formula-expressions`, `@objectstack/spec
check:skill-refs`, `check:dts-closure`, `check:lean-entry-closure`,
`check:sourcemap-no-sources-content`.
- NOT MEASURED, exit 3 PREREQUISITE NOT MET:
`check:dual-build-cjs-loads` (reads every package's dist; no package
source is touched, so no full build was paid locally; CI builds and runs
it).
- `--ran` reconciliation: "45 derived famil(ies) accounted for — 44 run,
1 NOT-MEASURED (1 DERIVED from a recorded exit 3)".
- Extra, not derived: `pnpm --filter @objectstack/spec
check:skill-examples` exit 0, "346 prose examples type-check across 3
surface(s)", which covers the new and the edited `os:check` blocks.
- CI families are read from this PR's check-runs, not re-run here.

</details>

<details><summary>Tier and governed readings</summary>

- `dispatch-gates --tier`: MANDATORY contract-review tier, both
`skills/**` paths under clause ① (the published catalog); no one-line
exit for this surface.
- `node scripts/pm/check-governed-merges.mjs --branch
claude/project-thread-g605co`: exit 3, GOVERNED, landing tier H (人合). 2
of 3 paths hit the register (`skills/**` x2); the changeset is not on
it. Size +47 / -29, under the 3000 threshold.

</details>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01FEkQ5njvc1ya6PypTHRBe5

## Round 1 (head `652a4a09`, after contract review 6885289276)

- **Delete guard (S1):** `data-hooks.md` Common Patterns "1. Preventing
Deletion (sandboxed `body`)" now declares `refusals` `STRATEGIC_ACCOUNT`
(400) and `OPEN_OPPORTUNITIES` (409) and throws each by code. The second
message drops the count, because a catalogue message takes no
parameters.
- **Wording (N1, N2):** "a `body`'s throw is answered `HOOK_ABORTED`";
`onError` "gives no code of the hook's own".
- **Paid in place:** the "Because the VM only holds a snapshot…"
paragraph (restated elsewhere in the file) and "(declared, never
produced)" in the `ctx.session` row.
- **Figures:** data-hooks.md 884 → 892 lines, 9962 → 10004 tokens
(ceiling 10011); validation.md 2760/2761, unchanged. No ceiling moved.
- **Verification on `652a4a09`:** 45 derived gates, 44 exit 0, 1 NOT
MEASURED (`check:dual-build-cjs-loads`). Scratch runtime probe, 4
passed: the guard answers 400 `VALIDATION_ERROR` with `declaredCode:
STRATEGIC_ACCOUNT`, then 409 `RESOURCE_CONFLICT` with `declaredCode:
OPEN_OPPORTUNITIES`, and deletes an account whose only opportunity is
closed.

<!-- signed: domain:skills#1 · os-project-manager ·
session_01FEkQ5pjSPT7ui2EUcunaVb -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…owner_id (objectstack-ai#33555)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XACQi5GZRKaJH4A4nUXpUQP)_

Fixes objectstack-ai#33506

domain:skills#1 · os-project-manager · session_01FEkQ5ocBJgBm6Bz2yqoibS

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 改了什么:objectstack-data 技能的「Record owner」规则写明:需求里的负责人、处理人、assignee、owner
就是平台注入的 `owner_id`,不另建字段;只有需求明确区分「负责人」和另一位处理者时才加一个 `user`
字段,且标签不得与对象上任何可见字段重名(点名注入列 `owner_id` Owner/负责人、`created_by`
创建人、`updated_by` 更新人、`created_at`、`updated_at`),并说明它不授予访问权。快速模板里的工单示例去掉了
`assigned_to` 字段,新增 eval 19(工单应用 + 负责人)。
- 为什么改:staging 上 AI 搭建的工单应用多建了一个标签也叫「负责人」的 `assignee`
字段,表格两列「负责人」、看板重复显示,而只有 `owner_id` 决定记录可见性。技能里的快速模板正好教了一个 `assigned_to`
用户字段。
- 风险与回滚:只改对外发布的技能文字和一条 eval,无代码、无契约改动;`@objectstack/skills` patch。回滚即还原本
PR。
- 先看:`skills/objectstack-data/SKILL.md` 的 Record owner
行;`references/examples-objects.md` 快速模板的 `// assignee`
行;`evals/objects-fields-relationships.json` 的 id 19。
- 两分钟验证:`node scripts/check-skills-token-ratchet.mjs | grep
objectstack-data/SKILL.md`,预期 `6657 tokens (ceiling 6665; headroom 8)`。
- 需要你做的:审阅并合并(`skills/**` 属 Tier H,需你亲手合并或授权批准)。

## What changes

All in `skills/objectstack-data/` (one owner file for the rule, two
cross-references, one eval):

- **`SKILL.md`, Relationship Patterns → Record owner row (the rule).**
The row already said "never a hand-added owner / person in charge
lookup". It now says the same `owner_id` answers a request's assignee,
负责人 or 处理人, and that a handler the request names apart from the owner is
a `user` field that grants no access, with a label no other visible
field carries, the injected columns included: `owner_id` (Owner, 负责人),
`created_by` (创建人), `updated_by` (更新人), `created_at` (创建时间),
`updated_at` (更新时间). The Field Type Selection bullet drops `assignee`
from its `user`-field examples so the two places no longer disagree.
- **`references/examples-objects.md`, Quick-Start Template
(cross-reference 1).** The `support_case` template declared
`assigned_to: { type: 'user' }` beside the injected `owner_id`: the
exact shape the staging build produced. It is replaced by the comment
`// assignee: the injected owner_id`.
- **`rules/field-types.md`, `user` row (cross-reference 2).** The
example list reads `(reviewer, watchers)` instead of `(assignee,
watchers)`; same byte count.
- **`evals/objects-fields-relationships.json`, eval 19** (and one README
phrase). The prompt asks, in Chinese, for a ticket app whose 负责人 can be
reassigned. It expects `owner_id` reused and must not contain
`assignee:`, `assigned_to:` or `label: '负责人'`.

The label set is measured, not guessed:
`packages/spec/src/data/injected-system-column-provenance.ts` defines
the injected columns (`owner_id` label `Owner`, not hidden;
`created_at`, `created_by`, `updated_at`, `updated_by` not hidden;
`organization_id`, `owning_business_unit_id`, `queue` hidden), and
`SYSTEM_FIELD_LABELS` in `packages/spec/src/system/i18n-resolver.ts`
serves their zh-CN labels (`owner_id` → 负责人, `created_by` → 创建人,
`updated_by` → 更新人, `created_at` → 创建时间, `updated_at` → 更新时间).

## Acceptance notes

- **No build check exists today.** `git grep` over `packages/lint/src`,
`packages/spec/src`, `packages/objectql/src` and `packages/cli/src` for
a duplicate- or colliding-label rule has no hit. The check is split to
objectstack-ai#33545 and is not touched here.
- **The objectstack-ui skill still teaches `assigned_to` as the owner
column.** `skills/objectstack-ui/rules/list-views.md` has `{ field:
'assigned_to', label: 'Owner' }` and a "mine" filter on `assigned_to`
(lines 53, 60, 101, 321), `rules/actions.md:44` uses it as a param, and
`evals/views-apps-actions-pages.json` eval 1 answers a prompt's "owner"
column with `assigned_to`. That is outside this order's surface (two
cross-references); reported to the seat as a follow-up.
- **Token payment, no ceiling raised.** `SKILL.md` is 6657 tokens
against its 6665 ceiling (6606 on the original base `e3f0cfd4`; 6665 on
today's `main`, after objectstack-ai#33458's `aiReadable` row spent the headroom round
1 had used). The new text costs about 82 tokens, all paid by deleting
restatement in the same file: the `(maintainer ruling 2026-08-13)`
aside; the `(ADR-0113)`, `(ADR-0061)`, `ADR-0120` and `(ADR-0146 D10)`
asides; the line "Toggle system behaviours per object:" that restates
its heading; the `ObjectExtensionSchema` and
`PermissionSetSchema.objects.*` schema pointers (`references/_index.md`
already points at `object.zod.ts` and `permission.zod.ts`); the internal
constant name `BASE_FIELD_DISPLAY_WHITELIST`; "See rules/validation.md
for all types and examples." (the Quick Reference list links it); and a
shorter new sentence. No eval expects any of the deleted text.
- **Round 2 merge (`4fccfc87`, `origin/main` `7f0e38a2`).** objectstack-ai#33586 added
its own eval 18 to `objects-fields-relationships.json`; main's file is
kept whole and this PR's eval follows unchanged as id 19. objectstack-ai#33589's
`field-types.md` lines are intact; this PR's diff there is still only
the `user` row's example word.

## Verification

Changed: 6 files, +40 / -19 (head `a2d3008d`). `dispatch-gates --tier`:
`Model tier — MANDATORY: claude-fable-5-2` (`skills/**`, no one-line
exit). `check-governed-merges --branch`: GOVERNED, Tier H (5 of 6 paths
on the register; the changeset is not), 59 changed lines, under 3000.
Changeset: `.changeset/33506-skills-owner-id-for-assignee.md`,
`'@objectstack/skills': patch` (`skills/**` ships in `dist/skills`).

Readings against today's `main` `7f0e38a2` (lines, then tokens; the
gate's count, which leaves out the release-stamp line):

| File | Lines before → after | Tokens before → after (ceiling) |
|:--|:--|:--|
| `skills/objectstack-data/SKILL.md` | 478 → 473 | 6665 → 6657 (6665) |
| `skills/objectstack-data/references/examples-objects.md` | 191 → 191 |
1723 → 1724 (1728) |
| `skills/objectstack-data/rules/field-types.md` | 246 → 246 | 3206 →
3206 (3208) |
| `skills/objectstack-data/evals/objects-fields-relationships.json` |
332 → 348 | eval fixture, not ratcheted |
| All `skills/*/SKILL.md` together | 4593 → 4588 | 59058 → 59050
(`ceil(bytes / 4)`, stamp lines included) |

<details><summary>47 derived gate families on a2d3008 (round 1 on
0249dda, same list and verdicts): 46 exit 0, 1 NOT MEASURED; `--ran`
reconciliation 47 / 47</summary>

Closure built first under the verify lock: `turbo run build
--filter=@objectstack/lint... --filter=@objectstack/client-react...`,
`VERDICT command-exit 0`.

```
node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0
node scripts/check-adr-0087-registration.mjs --self-test :: exit 0
node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-doc-route-spelling.mjs --advisory :: exit 0
node scripts/check-doc-route-spelling.mjs --self-test :: exit 0
node scripts/check-dts-emitted.mjs --self-test :: exit 0
node scripts/check-empty-changeset.mjs --base origin/main :: exit 0
node scripts/check-empty-changeset.mjs --self-test :: exit 0
node scripts/check-skills-token-ratchet.mjs :: exit 0
node scripts/check-skills-token-ratchet.mjs --self-test :: exit 0
node scripts/ci/assert-turbo-remote-cache.mjs --self-test :: exit 0
node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0
node scripts/ci/prune-turbo-cache.mjs --self-test :: exit 0
node scripts/ci/snapshot-next.mjs --self-test :: exit 0
node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0
node scripts/release-pending-publish.mjs --self-test :: exit 0
pnpm check:agent-test-spelling :: exit 0
pnpm check:changeset-gate-self-tests :: exit 0
pnpm check:ci-filter-parity :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:corpus-claim-drift :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:doc-authoring :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:merge-driver :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:pm-governed-merges :: exit 0
pnpm check:pm-skill-id-lint :: exit 0
pnpm check:published-files :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:role-word :: exit 0
pnpm check:skill-compatibility :: exit 0
pnpm check:skill-frame-sync :: exit 0
pnpm check:skill-identifier-liveness :: exit 0
pnpm check:skill-links :: exit 0
pnpm check:watch-hint-literal :: exit 0
pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0
pnpm --filter @objectstack/spec run check:skill-docs :: exit 0
pnpm --filter @objectstack/spec run check:skill-refs :: exit 0
pnpm check:dts-closure :: exit 0
pnpm check:dual-build-cjs-loads :: exit 3
pnpm check:lean-entry-closure :: exit 0
pnpm check:sourcemap-no-sources-content :: exit 0
```

`check:dual-build-cjs-loads` exit 3 is PREREQUISITE NOT MET (it reads
every package's `dist/`; no package is touched, so no full build is
owed): NOT MEASURED here, CI runs it. Outside the derivation, the edited
`os:check` block was verified with `pnpm --filter @objectstack/spec run
check:skill-examples` :: exit 0.

</details>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01FEkQ5ocBJgBm6Bz2yqoibS

<!-- signed: domain:skills#1 · os-project-manager ·
session_01FEkQ5ocBJgBm6Bz2yqoibS -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

skills: the object enable capability table does not teach aiReadable (read-only AI exposure, sys_* objects only) — PR #32971's Skills-docs follow-up

3 participants